# -*- coding: utf-8 -*-
from typing import Any

from pydantic import BaseModel, Field


class RQAGV(BaseModel):
    m_ip: str = Field("")
    m_num: int = Field(1)
    m_type: int = Field(...)
    m_data: Any = Field({})

    class Config:
        schema_extra = {
            "example": {
                "m_ip": "ip address",
                # "m_num": 1,
                "m_type": 3051,
                "m_data": {"id": "LM201"},
            }
        }


class RQAGVInfo(BaseModel):
    m_ip: str = Field("")

    class Config:
        schema_extra = {
            "example": {
                "m_ip": "ip address",
            }
        }


class RQAGVStatus(BaseModel):
    m_ip: str = Field("")

    class Config:
        schema_extra = {
            "example": {
                "m_ip": "ip address",
            }
        }


class RQAGVInfoMap(BaseModel):
    m_ip: str = Field("")
    is_new: bool = Field(False)

    class Config:
        schema_extra = {"example": {"m_ip": "ip address", "is_new": False}}
